/*
 * config_factory.h
 *
 *  Created on: 2016骞�鏈�1鏃�
 *      Author: fqk
 */

#ifndef NGX_HTTP_SECURITY_MODULE_CONFIG_FACTORY_H_
#define NGX_HTTP_SECURITY_MODULE_CONFIG_FACTORY_H_


#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_http.h>
#include "redis_model.h"
#include <stdlib.h>
#include <pthread.h>

#include "ngx_http_huidu_module_handle.h"

#define   SLEEP_TIME  60  //



extern huidu_limit_info_t *g_huidu_config;

extern pthread_t   config_thread_tid;

extern ngx_http_huidu_redis_address_t *g_redis_addr;
extern ngx_uint_t          g_redis_count;


int  start_config_thread(ngx_log_t *log);

void config_get_func();

void tran_to_huidu_str_array(str_array src_array, huidu_str_array_t *des_array);
void tran_to_huidu_limit_info(huidu_info src_info, huidu_limit_info_t *des_info);
void free_huidu_str_array(huidu_str_array_t  *array);
void free_huidu_limit_info(huidu_limit_info_t *limit_info);



#endif /* NGX_HTTP_SECURITY_MODULE_CONFIG_FACTORY_H_ */
